extends BaseClass

class_name StepRout

var point:Point
var steps:int
var rout:ArraySet

func init(p, s, r):
	point = p
	steps = s
	if r == null:
		rout = ArraySet.new()
	else:
		rout = r

func getRoutArray()->Array:
	var list = []
	for p in rout.arr:
		list.append(Vector2(p.x,p.y))
	return list

func initWithVector2(v:Vector2, s):
	point = Point.new()
	point.initWithVector2(v)
	steps = s
	rout = ArraySet.new()

func toString():
	var formatString = "point:%s, steps:%d, routSize:%d"
	return formatString % [point.toString(), steps, rout.size()]
